package com.ssy.lingxi.scheduler.api.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 查询定时任务返回的VO
 * @author 万宁
 * @version 2.0.0
 * @date 2021-07-12
 */
public class ScheduleTaskDefinitionVO implements Serializable {
    private static final long serialVersionUID = 5894220069372090872L;

    public ScheduleTaskDefinitionVO() {
        this.taskId = 0L;
        this.createTime = "";
        this.serviceName = "";
        this.callbackUrl = "";
        this.memberId = 0L;
        this.roleId = 0L;
        this.dataIds = new ArrayList<>();
        this.execTime = 0L;
        this.execTimeStr = "";
        this.taskName = "";
        this.taskGroup = "";
        this.taskAttributes = new HashMap<>();
        this.execCount = 0;
    }

    /**
     * 由定时任务服务生成的任务唯一Id
     */
    private Long taskId;

    /**
     * 创建时间，格式为yyyy-MM-dd HH:mm:ss
     */
    private String createTime;

    /**
     * 定时任务的服务名称
     */
    private String serviceName;

    /**
     * 调用方提供的回调接口Url
     */
    private String callbackUrl;

    /**
     * 会员Id
     */
    private Long memberId;

    /**
     * 会员角色Id
     */
    private Long roleId;

    /**
     * 定时任务的参数，例如订单Id等
     */
    private List<Long> dataIds;

    /**
     * 任务开始执行的时间，（Unix时间戳格式）
     */
    private Long execTime;

    /**
     * 任务开始执行的时间，格式为yyyy-MM-dd HH:mm:ss
     */
    private String execTimeStr;

    /**
     * 定时任务名称
     */
    private String taskName;

    /**
     * 定时任务分组
     */
    private String taskGroup;

    /**
     * 定时任务的自定义属性
     */
    private Map<String, Object> taskAttributes;

    /**
     * 任务已经执行的次数
     */
    private Integer execCount;

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getCallbackUrl() {
        return callbackUrl;
    }

    public void setCallbackUrl(String callbackUrl) {
        this.callbackUrl = callbackUrl;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public List<Long> getDataIds() {
        return dataIds;
    }

    public void setDataIds(List<Long> dataIds) {
        this.dataIds = dataIds;
    }

    public Long getExecTime() {
        return execTime;
    }

    public void setExecTime(Long execTime) {
        this.execTime = execTime;
    }

    public String getExecTimeStr() {
        return execTimeStr;
    }

    public void setExecTimeStr(String execTimeStr) {
        this.execTimeStr = execTimeStr;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskGroup() {
        return taskGroup;
    }

    public void setTaskGroup(String taskGroup) {
        this.taskGroup = taskGroup;
    }

    public Map<String, Object> getTaskAttributes() {
        return taskAttributes;
    }

    public void setTaskAttributes(Map<String, Object> taskAttributes) {
        this.taskAttributes = taskAttributes;
    }

    public Integer getExecCount() {
        return execCount;
    }

    public void setExecCount(Integer execCount) {
        this.execCount = execCount;
    }
}
